home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Directorty Opus 5 - Magellan 2
/
Opus 5 - Magellan 2.iso
/
Extras
/
D51_NARexx
/
DirToDest.dopus5
< prev
next >
Wrap
Text File
|
1995-12-26
|
2KB
|
78 lines
/* DirToDest for Directory Opus 5.
By Leo 'Nudel' Davidson for Gods'Gift Utilities
email: leo.davidson@keble.oxford.ac.uk www: http://info.ox.ac.uk/~kebl0364/
$VER: DirToDest.dopus5 1.4 (26.12.95)
NOTE: This script _requires_ DOpus v5.11 or above.
NOTE: DOpusFuncs is an assembler version of this (and other) scripts.
The scrips changes the DEST lister's path to the first selected directory
in the SOURCE lister. It's for when I don't want to reach for the SHIFT
key to drag-n-drop a directory into another lister.
v1.00 -> v1.01 - Now deselects the directory. (Oops, forgot about that).
v1.01 -> v1.02 - V. small changes, nothing to think about.
Now checks to make sure the DOPUS.x port exists.
v1.02 -> v1.3 - Now uses Show() instead of ShowList(). (Thanks Stoebi)
Style Guide compliant version numbering and $VER string.
v1.3 -> v1.4 - No change to functionality.
Call as:
------------------------------------------------------------------------------
ARexx DOpus5:ARexx/DirToDest.dopus5 {Qp}
------------------------------------------------------------------------------
Turn off all switches.
*/
options results
options failat 99
signal on syntax;signal on ioerr /* Error trapping */
parse arg DOpusPort
DOpusPort = Strip(DOpusPort,"B",'" ')
If DOpusPort="" THEN Do
Say "Not correctly called from Directory Opus 5!"
Say "Load this ARexx script into an editor for more info."
EXIT
END
If ~Show("P",DOpusPort) Then Do
Say DOpusPort "is not a valid port."
EXIT
End
Address value DOpusPort
lister query source stem source_handle.
IF source_handle.count = 0 | source_handle.count = "SOURCE_HANDLE.COUNT" Then Do
dopus request '"You must have a SOURCE lister!" OK'
EXIT
End
lister query dest stem dest_handle.
IF dest_handle.count = 0 | dest_handle.count = "DEST_HANDLE.COUNT" Then Do
dopus request '"You must have a DESTINATION lister!" OK'
EXIT
End
lister query source_handle.0 path
source_path = RESULT
lister query source_handle.0 seldirs stem source_dir.
IF source_dir.count = 0 | source_dir.count = "SOURCE_DIR.COUNT" Then Do
dopus request '"You must have a directory selected'||X2C(0A)||'in the SOURCE lister!" OK'
EXIT
End
lister read dest_handle.0 source_path||source_dir.0
lister select source_handle.0 source_dir.0 0
lister refresh source_handle.0
syntax:;ioerr: /* In case of error, jump here */
EXIT